.class public Lcom/glympse/android/glympse/DlgActions;
.super Lcom/glympse/android/glympse/DlgList;
.source "DlgActions.java"

# interfaces
.implements Lcom/glympse/platform/common/GlympseListener;
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/glympse/android/glympse/DlgActions$Action;,
        Lcom/glympse/android/glympse/DlgActions$ActionAdapter;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/glympse/android/glympse/DlgList;",
        "Lcom/glympse/platform/common/GlympseListener;",
        "Landroid/widget/AdapterView$OnItemClickListener;"
    }
.end annotation


# instance fields
.field private m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

.field private m_oUser:Lcom/glympse/platform/common/User;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/glympse/platform/common/User;)V
    .locals 4
    .parameter "oContext"
    .parameter "oUser"

    .prologue
    const/4 v1, 0x0

    const/4 v3, 0x1

    .line 49
    invoke-direct {p0, p1, v1}, Lcom/glympse/android/glympse/DlgList;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    .line 43
    iput-object v1, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    .line 44
    iput-object v1, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    .line 52
    iput-object p2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    .line 55
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "Actions for "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p2, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    iget-object v2, p2, Lcom/glympse/platform/common/User;->m_strVisibleDisplayName:Ljava/lang/String;

    :goto_0
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/DlgActions;->SetTitleText(Ljava/lang/String;)V

    .line 58
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->GetTitleImage()Landroid/widget/ImageView;

    move-result-object v0

    .line 59
    .local v0, oImage:Landroid/widget/ImageView;
    const/high16 v1, -0x100

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundColor(I)V

    .line 60
    invoke-virtual {v0, v3, v3, v3, v3}, Landroid/widget/ImageView;->setPadding(IIII)V

    .line 63
    if-eqz p2, :cond_2

    .line 64
    iget-object v1, p2, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    if-eqz v1, :cond_2

    .line 65
    iget-object v1, p2, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    iget-object v1, v1, Lcom/glympse/platform/GImage;->m_oDrawable:Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v1, :cond_2

    .line 67
    iget-object v1, p2, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    iget-object v1, v1, Lcom/glympse/platform/GImage;->m_oDrawable:Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/DlgActions;->SetTitleIcon(Landroid/graphics/drawable/Drawable;)V

    .line 73
    :goto_1
    return-void

    .line 55
    .end local v0           #oImage:Landroid/widget/ImageView;
    :cond_0
    invoke-virtual {p2}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v2

    if-eqz v2, :cond_1

    const-string v2, "Me"

    goto :goto_0

    :cond_1
    const-string v2, "this user"

    goto :goto_0

    .line 71
    .restart local v0       #oImage:Landroid/widget/ImageView;
    :cond_2
    const v1, 0x7f0200bc

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/DlgActions;->SetTitleIcon(I)V

    goto :goto_1
.end method

.method static synthetic access$0(Lcom/glympse/android/glympse/DlgActions;)Lcom/glympse/platform/common/User;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    return-object v0
.end method


# virtual methods
.method public DoRoute(Lcom/glympse/android/glympse/DlgActions$Action;)V
    .locals 9
    .parameter "oAction"

    .prologue
    const/4 v8, 0x7

    .line 189
    const-wide/16 v0, 0x0

    .line 190
    .local v0, dDstLat:D
    const-wide/16 v2, 0x0

    .line 191
    .local v2, dDstLng:D
    iget-object v5, p1, Lcom/glympse/android/glympse/DlgActions$Action;->m_oPlace:Lcom/glympse/platform/common/Place;

    if-eqz v5, :cond_2

    .line 193
    iget-object v5, p1, Lcom/glympse/android/glympse/DlgActions$Action;->m_oPlace:Lcom/glympse/platform/common/Place;

    iget-wide v0, v5, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    .line 194
    iget-object v5, p1, Lcom/glympse/android/glympse/DlgActions$Action;->m_oPlace:Lcom/glympse/platform/common/Place;

    iget-wide v2, v5, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    .line 207
    :goto_0
    invoke-virtual {p0, p1}, Lcom/glympse/android/glympse/DlgActions;->GetDestinationName(Lcom/glympse/android/glympse/DlgActions$Action;)Ljava/lang/String;

    move-result-object v5

    invoke-static {v0, v1, v2, v3, v5}, Lcom/glympse/platform/ProviderVerizon;->DoRoute(DDLjava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_1

    .line 214
    const-string v4, "http://maps.google.com/maps?"

    .line 217
    .local v4, strUrl:Ljava/lang/String;
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v5, v5, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    invoke-virtual {v5}, Lcom/glympse/platform/common/LocPoint;->HasLocation()Z

    move-result v5

    if-eqz v5, :cond_0

    .line 219
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "saddr="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    iget-object v6, v6, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v6, v6, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget-wide v6, v6, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    invoke-static {v6, v7, v8}, Lcom/glympse/platform/common/Helpers;->DoubleToStr(DI)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    iget-object v6, v6, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v6, v6, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget-wide v6, v6, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    invoke-static {v6, v7, v8}, Lcom/glympse/platform/common/Helpers;->DoubleToStr(DI)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "&"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 223
    :cond_0
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "daddr="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-static {v0, v1, v8}, Lcom/glympse/platform/common/Helpers;->DoubleToStr(DI)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-static {v2, v3, v8}, Lcom/glympse/platform/common/Helpers;->DoubleToStr(DI)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 226
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->getContext()Landroid/content/Context;

    move-result-object v5

    new-instance v6, Landroid/content/Intent;

    const-string v7, "android.intent.action.VIEW"

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v8

    invoke-direct {v6, v7, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    invoke-virtual {v5, v6}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 228
    .end local v4           #strUrl:Ljava/lang/String;
    :cond_1
    return-void

    .line 196
    :cond_2
    iget-object v5, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    if-eqz v5, :cond_1

    .line 198
    iget-object v5, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v5}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v5

    iget-wide v0, v5, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    .line 199
    iget-object v5, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v5}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v5

    iget-wide v2, v5, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    goto/16 :goto_0
.end method

.method public DoUpdate(I)V
    .locals 1
    .parameter "nUpdateFlags"

    .prologue
    .line 179
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    if-eqz v0, :cond_0

    const v0, 0x40002600

    and-int/2addr v0, p1

    if-eqz v0, :cond_0

    .line 181
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/DlgActions$ActionAdapter;->notifyDataSetChanged()V

    .line 183
    :cond_0
    return-void
.end method

.method public GetDestinationName(Lcom/glympse/android/glympse/DlgActions$Action;)Ljava/lang/String;
    .locals 7
    .parameter "oAction"

    .prologue
    .line 315
    const/4 v1, 0x0

    .line 316
    .local v1, strUser:Ljava/lang/String;
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    if-nez v2, :cond_0

    .line 318
    const-string v1, "This user\'s"

    .line 333
    :goto_0
    const/4 v0, 0x0

    .line 334
    .local v0, strDst:Ljava/lang/String;
    iget-object v2, p1, Lcom/glympse/android/glympse/DlgActions$Action;->m_oPlace:Lcom/glympse/platform/common/Place;

    if-nez v2, :cond_4

    .line 336
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, " location"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 343
    :goto_1
    return-object v0

    .line 320
    .end local v0           #strDst:Ljava/lang/String;
    :cond_0
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v2}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 322
    const-string v1, "My"

    goto :goto_0

    .line 324
    :cond_1
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    iget-object v2, v2, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 326
    const-string v1, "This user\'s"

    goto :goto_0

    .line 330
    :cond_2
    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v3, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    iget-object v3, v3, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const/16 v3, 0x73

    iget-object v4, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    iget-object v4, v4, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    iget-object v5, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    iget-object v5, v5, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    const/4 v6, 0x1

    sub-int/2addr v5, v6

    invoke-virtual {v4, v5}, Ljava/lang/String;->charAt(I)C

    move-result v4

    invoke-static {v4}, Ljava/lang/Character;->toLowerCase(C)C

    move-result v4

    if-ne v3, v4, :cond_3

    const-string v3, "\'"

    :goto_2
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    :cond_3
    const-string v3, "\'s"

    goto :goto_2

    .line 340
    .restart local v0       #strDst:Ljava/lang/String;
    :cond_4
    iget-object v2, p1, Lcom/glympse/android/glympse/DlgActions$Action;->m_oPlace:Lcom/glympse/platform/common/Place;

    iget-object v2, v2, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, " destination"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    move-object v0, v2

    :goto_3
    goto :goto_1

    :cond_5
    iget-object v2, p1, Lcom/glympse/android/glympse/DlgActions$Action;->m_oPlace:Lcom/glympse/platform/common/Place;

    iget-object v2, v2, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    move-object v0, v2

    goto :goto_3
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 12
    .parameter "savedInstanceState"

    .prologue
    .line 78
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->getContext()Landroid/content/Context;

    move-result-object v3

    .line 81
    .local v3, oContext:Landroid/content/Context;
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 84
    .local v2, listActions:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/glympse/android/glympse/DlgActions$Action;>;"
    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v6

    if-nez v6, :cond_0

    .line 86
    new-instance v6, Lcom/glympse/android/glympse/DlgActions$Action;

    const/4 v7, 0x0

    .line 87
    const v8, 0x7f0a0038

    invoke-virtual {v3, v8}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 88
    const v9, 0x7f020005

    .line 89
    const/4 v10, 0x0

    invoke-direct {v6, v7, v8, v9, v10}, Lcom/glympse/android/glympse/DlgActions$Action;-><init>(ILjava/lang/String;ILcom/glympse/platform/common/Place;)V

    .line 86
    invoke-virtual {v2, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 93
    :cond_0
    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v6

    if-nez v6, :cond_1

    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->HasLocation()Z

    move-result v6

    if-eqz v6, :cond_1

    .line 95
    new-instance v6, Lcom/glympse/android/glympse/DlgActions$Action;

    const/4 v7, 0x1

    .line 96
    const v8, 0x7f0a0039

    invoke-virtual {v3, v8}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 97
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetRouteToUserImage()I

    move-result v9

    .line 98
    const/4 v10, 0x0

    invoke-direct {v6, v7, v8, v9, v10}, Lcom/glympse/android/glympse/DlgActions$Action;-><init>(ILjava/lang/String;ILcom/glympse/platform/common/Place;)V

    .line 95
    invoke-virtual {v2, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 102
    :cond_1
    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v6

    if-eqz v6, :cond_6

    .line 104
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v0

    .line 107
    .local v0, lCurrent:J
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    iget-object v6, v6, Lcom/glympse/platform/Platform;->m_oSentTickets:Lcom/glympse/platform/common/SentTicketList;

    iget-object v6, v6, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v6}, Lcom/glympse/platform/GVector$Tickets;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :cond_2
    :goto_0
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-nez v7, :cond_5

    .line 139
    .end local v0           #lCurrent:J
    :cond_3
    :goto_1
    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->HasLocation()Z

    move-result v6

    if-eqz v6, :cond_4

    .line 141
    new-instance v6, Lcom/glympse/android/glympse/DlgActions$Action;

    const/4 v7, 0x3

    .line 142
    const v8, 0x7f0a003a

    invoke-virtual {v3, v8}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 143
    const v9, 0x7f020001

    .line 144
    const/4 v10, 0x0

    invoke-direct {v6, v7, v8, v9, v10}, Lcom/glympse/android/glympse/DlgActions$Action;-><init>(ILjava/lang/String;ILcom/glympse/platform/common/Place;)V

    .line 141
    invoke-virtual {v2, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 148
    :cond_4
    new-instance v6, Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->getContext()Landroid/content/Context;

    move-result-object v7

    invoke-direct {v6, p0, v7, v2}, Lcom/glympse/android/glympse/DlgActions$ActionAdapter;-><init>(Lcom/glympse/android/glympse/DlgActions;Landroid/content/Context;Ljava/util/ArrayList;)V

    iput-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    .line 149
    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    const/4 v7, 0x0

    invoke-virtual {p0, v6, p0, v7}, Lcom/glympse/android/glympse/DlgActions;->SetListAdapter(Landroid/widget/ListAdapter;Landroid/widget/AdapterView$OnItemClickListener;Z)Landroid/widget/ListView;

    move-result-object v4

    .line 152
    .local v4, oListView:Landroid/widget/ListView;
    const v6, 0x7f0a0097

    invoke-virtual {p0, v6}, Lcom/glympse/android/glympse/DlgActions;->SetEmptyText(I)V

    .line 155
    invoke-virtual {v4}, Landroid/widget/ListView;->requestFocus()Z

    .line 156
    const/4 v6, 0x0

    invoke-virtual {v4, v6}, Landroid/widget/ListView;->setSelection(I)V

    .line 159
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    invoke-virtual {v6, p0}, Lcom/glympse/platform/Platform;->AddGlympseListener(Lcom/glympse/platform/common/GlympseListener;)V

    .line 161
    invoke-super {p0, p1}, Lcom/glympse/android/glympse/DlgList;->onCreate(Landroid/os/Bundle;)V

    .line 162
    return-void

    .line 107
    .end local v4           #oListView:Landroid/widget/ListView;
    .restart local v0       #lCurrent:J
    :cond_5
    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/glympse/platform/common/Ticket;

    .line 110
    .local v5, oTicket:Lcom/glympse/platform/common/Ticket;
    iget-wide v7, v5, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    cmp-long v7, v7, v0

    if-lez v7, :cond_3

    .line 116
    invoke-virtual {v5}, Lcom/glympse/platform/common/Ticket;->HasLocation()Z

    move-result v7

    if-eqz v7, :cond_2

    .line 118
    new-instance v7, Lcom/glympse/android/glympse/DlgActions$Action;

    const/4 v8, 0x2

    .line 119
    const v9, 0x7f0a0039

    invoke-virtual {v3, v9}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v9

    .line 120
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetRouteToDestImage()I

    move-result v10

    .line 121
    iget-object v11, v5, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-direct {v7, v8, v9, v10, v11}, Lcom/glympse/android/glympse/DlgActions$Action;-><init>(ILjava/lang/String;ILcom/glympse/platform/common/Place;)V

    .line 118
    invoke-virtual {v2, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 129
    .end local v0           #lCurrent:J
    .end local v5           #oTicket:Lcom/glympse/platform/common/Ticket;
    :cond_6
    iget-object v6, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->GetTicketWithLatestStartTime()Lcom/glympse/platform/common/Ticket;

    move-result-object v5

    .line 130
    .restart local v5       #oTicket:Lcom/glympse/platform/common/Ticket;
    if-eqz v5, :cond_3

    invoke-virtual {v5}, Lcom/glympse/platform/common/Ticket;->HasLocation()Z

    move-result v6

    if-eqz v6, :cond_3

    .line 132
    new-instance v6, Lcom/glympse/android/glympse/DlgActions$Action;

    const/4 v7, 0x2

    .line 133
    const v8, 0x7f0a0039

    invoke-virtual {v3, v8}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 134
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetRouteToDestImage()I

    move-result v9

    .line 135
    iget-object v10, v5, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-direct {v6, v7, v8, v9, v10}, Lcom/glympse/android/glympse/DlgActions$Action;-><init>(ILjava/lang/String;ILcom/glympse/platform/common/Place;)V

    .line 132
    invoke-virtual {v2, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_1
.end method

.method protected onDestroy()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 167
    invoke-super {p0}, Lcom/glympse/android/glympse/DlgList;->onDestroy()V

    .line 170
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/glympse/platform/Platform;->RemoveGlympseListener(Lcom/glympse/platform/common/GlympseListener;)V

    .line 172
    iput-object v1, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    .line 173
    iput-object v1, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    .line 174
    return-void
.end method

.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 7
    .parameter
    .parameter "oView"
    .parameter "nPos"
    .parameter "lRow"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 233
    .local p1, oAdapterView:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    if-nez v2, :cond_1

    .line 285
    :cond_0
    :goto_0
    return-void

    .line 238
    :cond_1
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oActionAdapter:Lcom/glympse/android/glympse/DlgActions$ActionAdapter;

    invoke-virtual {v2, p3}, Lcom/glympse/android/glympse/DlgActions$ActionAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/glympse/android/glympse/DlgActions$Action;

    .line 239
    .local v1, oAction:Lcom/glympse/android/glympse/DlgActions$Action;
    if-eqz v1, :cond_0

    .line 244
    iget v2, v1, Lcom/glympse/android/glympse/DlgActions$Action;->m_eAction:I

    packed-switch v2, :pswitch_data_0

    goto :goto_0

    .line 247
    :pswitch_0
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    if-eqz v2, :cond_0

    .line 249
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    iget-object v3, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v2, v3}, Lcom/glympse/platform/common/ServerPost;->AddDropFriend(Lcom/glympse/platform/common/User;)Z

    .line 250
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v2}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    .line 251
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->dismiss()V

    goto :goto_0

    .line 259
    :pswitch_1
    :try_start_0
    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/DlgActions;->DoRoute(Lcom/glympse/android/glympse/DlgActions$Action;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 265
    :goto_1
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->dismiss()V

    goto :goto_0

    .line 261
    :catch_0
    move-exception v0

    .line 263
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_1

    .line 269
    .end local v0           #e:Ljava/lang/Exception;
    :pswitch_2
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    if-eqz v2, :cond_0

    .line 273
    :try_start_1
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->getContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "clipboard"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/text/ClipboardManager;

    .line 274
    new-instance v3, Ljava/lang/StringBuilder;

    iget-object v4, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v4}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v4

    iget-wide v4, v4, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    const/4 v6, 0x7

    invoke-static {v4, v5, v6}, Lcom/glympse/platform/common/Helpers;->DoubleToStr(DI)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    .line 275
    iget-object v4, p0, Lcom/glympse/android/glympse/DlgActions;->m_oUser:Lcom/glympse/platform/common/User;

    invoke-virtual {v4}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v4

    iget-wide v4, v4, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    const/4 v6, 0x7

    invoke-static {v4, v5, v6}, Lcom/glympse/platform/common/Helpers;->DoubleToStr(DI)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    .line 274
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 273
    invoke-virtual {v2, v3}, Landroid/text/ClipboardManager;->setText(Ljava/lang/CharSequence;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 281
    :goto_2
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgActions;->dismiss()V

    goto :goto_0

    .line 277
    :catch_1
    move-exception v2

    move-object v0, v2

    .line 279
    .restart local v0       #e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_2

    .line 244
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method
